<template>
	<uni-card :margin="1" :padding="0">
		<uni-list>
			<uni-list-chat :avatar-circle="true" :title="account"
				:avatar="photoUrl" :note="userName"
				time="2020-02-02 20:20" clickable showArrow @click="onModify()"></uni-list-chat>
		</uni-list>
	</uni-card>
	<uni-card :margin="1" :padding="0">
		<u-cell-group>
			<u-cell
			    title="修改登录密码"
			    icon="list-dot"
				@click="onModify"
				rightIcon
				clickable
			>
			
			</u-cell>
			<u-cell
			    title="退出"
			    icon="share-square"
				@click="logout"
				rightIcon
				clickable
			></u-cell>
		</u-cell-group>
	</uni-card>
</template>

<script setup>
	import {
		inject,
		reactive,
		ref
	} from 'vue'
	const pinia = inject("$pinia")
	const userName = ref(pinia.name);
	const account = ref(pinia.account);
	const photoUrl = ref(pinia.photoUrl);
	const extraIcon = reactive([{
		color: '#4cd964',
		size: '22',
		type: 'color'
	},{
		color: '#DAA520',
		size: '22',
		type: 'color'
	}])
	function onModify() {
		uni.navigateTo({
			url:'/pages/modifypass/modifypass'
		})
	}
	function logout(){
		uni.navigateTo({
			url:"/pages/login/login"
		})
	}
</script>
<style>
</style>